package com.qf.homeworkssm.vo;


import com.sun.istack.internal.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class HelloVo {

    @NotNull
    private Integer id;

    @NotNull //需要字符串不能为空
    @NotEmpty  //不可以为空串
    @Size(min = 5, max = 100)
    private String name;

    @Email
    private String email;

    @Pattern(regexp = "^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0\\d|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[\\dXx]$")
    private String sf;

}
